﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace JohnWells.GameLevel.ContentPipeline.Leadwerks14
{
    internal sealed class Lightmap
    {
        
        // Enumerations
        [Flags]
        public enum LightmapFlags
        {
            None = 0
        }

        LightmapFlags flags;
        int resolution;
        int format;

        public Lightmap(BinaryReader reader, string[] names)
        {
              // Read the material flags
            this.flags = (LightmapFlags)reader.ReadByte();
            
            // This object is just two strings, really
            this.resolution = reader.ReadByte();

            this.format = reader.ReadInt32();

            int lmsize = 2;
            for (int i = 0; i < resolution-1; i++) lmsize *= 2;
            for (int i = 0; i < lmsize; i++)
            {
                for (int j = 0; j < lmsize; j++)
                {
                    reader.ReadByte();
                    reader.ReadByte();
                    reader.ReadByte();
                }
            }
        }
    }
}
